package com.cos.openapi.services;

import com.cos.openapi.common.ResponseResult;
import com.cos.openapi.common.ResultTable;
import com.cos.openapi.entity.AdminUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author: COS
 * @time: 2021/11/23 16:45
 * @description:
 */
public interface AdminUserServices {
    AdminUser getUserByEmail(String email);
    /**
     *
     * @author: COS
     * @return:
     * @time: 2021/11/23 16:47
     * @description: 登录业务
     */
    AdminUser doLogin(String email,String password);

    ResultTable table(Integer page, Integer limit, String realName, String email, Integer status);

    List<Integer> getUserRole(Integer userId);

    ResponseResult assignRole(Integer userId, Integer[] roleIds);

    ResponseResult delUsers(Integer[] ids);

    ResponseResult addUser(AdminUser user);

    ResponseResult updateUser(AdminUser user);
}
